home *** CD-ROM | disk | FTP | other *** search
- // Copyright (c)1995 Ray Dream, Inc. All Rights Reserved.
- /* $Id: Checker.h 1.1 1996/07/19 00:15:33 Damien Exp $ */
- // Example of a CheckerShader Creation
-
- #ifndef __CHECKER__
- #define __CHECKER__
-
- #ifndef __COMSHDR__
- #include "COMShdr.H"
- #endif
-
- DEFINE_GUID(CLSID_CheckerShader, 0x1C2DAC60L, 0x2ED7, 0x101C, 0x88, 0x5F, 0x04, 0x02, 0x1C, 0x00, 0x70, 0x02);
-
- // Data structure for exchange with the Shell
- struct CheckerShaderPublicData {
- short nbSquareU,nbSquareV; // Number of squares (Horizontally and Vertically)
- };
-
- // Control the new checker shade
- #undef INTERFACE
- #define INTERFACE CheckerShader
- class CheckerShader : public COMShader {
- public :
- CheckerShader();
- ~CheckerShader();
-
- STDMETHODIMP_(I3DExtension*) Clone(THIS);
- STDMETHODIMP_(short) GetResID(THIS);
- STDMETHODIMP_(void*) GetExtensionDataBuffer(THIS);
- STDMETHODIMP_(Boolean) IsEqualTo(THIS_ I3DExShader* aShader);
- STDMETHODIMP_(Boolean) DependsOnAppliedExtent(THIS);
- STDMETHODIMP DoShade(THIS_ ShadingInOut* theShadingIO, ShadingElem* theShadingElem);
- STDMETHODIMP GetValue(THIS_ NUM3D* result, ShadingIn* theShadingIn, ShadingElem* theShadingElem);
- STDMETHODIMP GetColor(THIS_ COLOR3D* result, ShadingIn* theShadingIn, ShadingElem* theShadingElem);
- STDMETHODIMP GetVector(THIS_ VECTOR3D* result, ShadingIn* theShadingIn, ShadingElem* theShadingElem);
- STDMETHODIMP GetShadingFlags(THIS_ ShadingFlags* theFlags);
- STDMETHODIMP_(ULONG) GetPreferredOutput(THIS);
-
- STDMETHODIMP_(ExtensionDataMap*) GetExtensionDataMap(THIS);
-
- CheckerShaderPublicData CheckerPublicData;
-
- protected:
- void CopyData(COMShader* dest);
- VECTOR2D fMul; // Preprocessing factor
- // to convert UV Coordinate to "Checker" Coordinate
- };
-
- #endif // __CHECKER__
-
-